﻿<br />
<div class="code">
&#64;model&nbsp;CountriesModel<br />
<br />
&lt;p&gt;Destination&nbsp;country:&nbsp;&lt;<span class="Linq">select</span>&nbsp;&#64;Html.KoAttrOptions(m&nbsp;=&gt;&nbsp;m.AvailableCountries).KoAttrValue(m&nbsp;=&gt;&nbsp;m.SelectedCountry)&gt;&lt;/<span class="Linq">select</span>&gt;&lt;/p&gt;<br />
&lt;p&gt;Selected&nbsp;destination&nbsp;country:&nbsp;&lt;span&nbsp;&#64;Html.KoAttrText(m&nbsp;=&gt;&nbsp;m.SelectedCountry)&gt;&lt;/span&gt;&lt;/p&gt;<br />
<br />
&lt;p&gt;Add&nbsp;<span class="String">"China"</span>&nbsp;to&nbsp;the&nbsp;list&nbsp;&lt;input&nbsp;type=<span class="String">"button"</span><br />onclick=<span class="String">"&#64;(KoHelper.GetRootContext()&nbsp;+&nbsp;"</span>.<span class="String">"&nbsp;+&nbsp;Html.ArrayPush(m&nbsp;=&gt;&nbsp;m.AvailableCountries,&nbsp;"</span>China<span class="String">"))"</span>&nbsp;value=<span class="String">"Add"</span>/&gt;&nbsp;&lt;/p&gt;<br />
<br />
&#64;Model.ApplyBindingsScript(KoBindingOptions.IncludeData)
</div>